Skip to content

Conversation

@FBanfi
Copy link
Collaborator

@FBanfi FBanfi commented Dec 18, 2025

Purpose

This update adds the metrics section as well as the extraction of the main logic, so we can reuse it in both the Home and Page locations.

Also, in this PR we include the connection between the fetch for the scheduled actions and the UI.

Approach

IMP: In this PR the refresh button was removed, it does the same as a navigator refresh. In other apps (Homebase) we removed this type of button for that reason, so I follow the same approach here.

Implemented a metrics dashboard that calculates and displays 5 content production metrics from Contentful entries and scheduled actions:

  • Total Published
  • Average Time to Publish
  • Scheduled, Recently Published
  • Needs Update

The metrics use configurable time periods from installation parameters (needsUpdateMonths, recentlyPublishedDays, timeToPublishDays) and are rendered as styled cards.

The MetricsCalculator class performs all calculations in the constructor, and the Dashboard component is reusable across both Page and Home locations.

  • Note: Although this class's behavior is limited to the constructor, it provides encapsulation of the calculation logic, ensures consistent state (same timestamp for all metrics), and offers a user-friendly, immutable interface that simplifies usage and testing.

Testing steps

Automated tests added.

With entries and scheduled actions:

Captura de pantalla 2025-12-18 a la(s) 11 08 00 a  m

Without any entry or scheduled actions:

Captura de pantalla 2025-12-18 a la(s) 11 10 13 a  m

With negative published percentage:

Captura de pantalla 2025-12-18 a la(s) 11 12 37 a  m

How the flow works:

Grabacion.de.pantalla.2025-12-18.a.la.s.4.27.55.p.m.mov

Scheduled actions:

Grabacion.de.pantalla.2026-01-05.a.la.s.2.46.51.p.m.mov

Breaking Changes

N/A

Dependencies and/or References

Link to MAPS-123

Deployment

N/A

@FBanfi FBanfi requested a review from a team as a code owner December 18, 2025 14:17
Copy link
Collaborator

@JuliRossi JuliRossi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work :D

Copy link
Collaborator

@joaquincasal joaquincasal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Left two minor comments

@FBanfi FBanfi merged commit f2d727a into content-production-dashboard Jan 6, 2026
11 checks passed
@FBanfi FBanfi deleted the content-production-dashboard-123 branch January 6, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants